package cn.ffcs.hhs;

import cn.ffcs.hhs.TurnplateView.OnTurnplateListener;
import android.app.Activity;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.View;
import android.widget.Toast;

public class Main extends Activity implements OnTurnplateListener{
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        DisplayMetrics dm = new DisplayMetrics();  
		this.getWindowManager().getDefaultDisplay().getMetrics(dm);  
	      
	    int width = dm.widthPixels;  
	    int height = dm.heightPixels;  
	    TurnplateView view = new TurnplateView(getApplicationContext(), width/2, height/2, 100);
	    view.setOnTurnplateListener(this);
        setContentView(view);
    }

	
	@Override
	public void onPointTouch(int flag) {
		//Log.e("onPointTouch", ""+flag);
		Toast.makeText(this, ""+flag+"", Toast.LENGTH_SHORT).show();
		
	}
}